package com.ruoyi.common.enums;

import com.ruoyi.common.utils.StringUtils;

public enum TrainTypeEnum {
    YXL("0", "预训练"),
    YXL2("1", "二次预训练"),
    YHXL("2", "优化训练");

    TrainTypeEnum(String value, String msg) {
        this.msg = msg;
        this.value = value;
    }

    private String value;

    private String msg;

    public String getMsg() {
        return msg;
    }

    public String getValue() {
        return value;
    }

    public static String toTrainTypeString(String trainType) {
        if (StringUtils.isEmpty(trainType))
            return trainType;
        trainType = trainType.replace(YXL.value, YXL.msg);
        trainType = trainType.replace(YXL2.value, YXL2.msg);
        trainType = trainType.replace(YHXL.value, YHXL.msg);
        return trainType;
    }

}
